﻿@model ConsentViewModel
@{
    ViewData["Title"] = "Index";
}

<h2>Index</h2>


<div class="row page-header">
    <div class="col-sm-10">
        @if (!string.IsNullOrEmpty(Model.ClientLogoUrl))
        {
            <div><img src="@Model.ClientLogoUrl" /></div>
        }
        <h1>
            @Model.ClientName
            <small>希望使用你的账户</small>
        </h1>
    </div>
</div>

<div class="row">
    <div class="col-sm-8">
        <form asp-action="Index">
            @if (Model.IdentityScopes.Any())
            {
                <div class="panel">
                    <div class="page-header">
                        <span class="glyphicon glyphicon-tasks"></span>
                        用户信息
                    </div>
                </div>
                <ul class="list-group">
                    @foreach (var scope in Model.IdentityScopes)
                    {
                        @Html.Partial("_ScopeLimitPartial", scope)
                    }
                </ul>
            }


            @if (Model.ResourceScopes.Any())
            {
                <div class="panel">
                    <div class="page-header">
                        <span class="glyphicon glyphicon-tasks"></span>
                        应用权限
                    </div>
                </div>
                <ul class="list-group">
                    @foreach (var scope in Model.ResourceScopes)
                    {
                        @Html.Partial("_ScopeLimitPartial", scope)
                    }
                </ul>
            }
        </form>
    </div>
</div>

